-
Couldn't load subscription status.
- Fork 2
update sbp/sbp-settings #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| let mut name = msg.name.to_string(); | ||
| if name.is_empty() { | ||
| name = NO_NAME.to_string(); | ||
| let name = if msg.name.as_bytes().iter().all(|b| b == &0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting so a "no name" string that comes in would still have null characters? I guess you are just checking for the one null char that would indicate an empty string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think (@silverjam could probably confirm) that because the string is fixed length it will always be 20 chars so whatever space you don't use will be a null byte. So the "empty" string in this case is 20 nulls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is correct from what I remember
| PackedObsContentDepC, PackedOsrContent, | ||
| }, | ||
| SBP, | ||
| piksi::{Latency, MsgSpecan, MsgSpecanDep, MsgUartState, MsgUartStateDepa, Period}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how big of a change it would be but since you are working on sbp message naming I will point out this MsgUartStateDepa seems to break the more common scheme.
No description provided.